import copy

t1=(1,2,3,"afe",[123,52,543])

#复制
t2=copy.copy(t1)
t3=copy.deepcopy(t1)

t1[4].append(888)

print(t1,id(t1))
print(t2,id(t2))
print(t3,id(t3))

#浅拷贝拷贝的是地址，深拷贝是拷贝值并开辟新地址
#深拷贝和浅拷贝都是拷贝对象



# import copy
#
# t1=(1,23,'aa',[123,414,22])
# t2 = copy.copy(t1)
# t3 = copy.deepcopy(t1)
#
# t1[3].append(666)
#
# print(t1,id(t1))
# print(t2,id(t2))
# print(t3,id(t3))
